package com.novax.ex.activity.open.api.inner;

import com.novax.ex.activity.open.model.query.MallStatementItemQuery;
import com.novax.ex.activity.open.model.query.MallStatementSalesQuery;
import com.novax.ex.activity.open.model.query.ParticipationRecordQuery;
import com.novax.ex.activity.open.model.query.PaymentRecordQuery;
import com.novax.ex.activity.open.model.response.MallStatementItemResponse;
import com.novax.ex.activity.open.model.response.MallStatementSalesResponse;
import com.novax.ex.activity.open.model.response.ParticipationRecordResponse;
import com.novax.ex.activity.open.model.response.PaymentRecordResponse;
import com.novax.ex.common.results.ReturnResult;
import com.novax.ex.common.util.PageUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * Description: 数据报表
 *
 * @author Deucalion@novax.email
 * @date 2023/2/21 16:05
 */
@Tag(name = "一元购-数据报表", description = "数据报表")
@FeignClient(url = "${remote.activity-service.endpoint}", name = "MallStatementInnerApi", contextId = "MallStatementInnerApi")
public interface MallStatementInnerApi {

    @Operation(summary = "商品销售报表", description = "商品销售报表")
    @GetMapping("/v3/private/mall/product/statement/sales")
    ReturnResult<PageUtil<MallStatementSalesResponse>> sales(
            @RequestHeader("language") String language,
            @ParameterObject MallStatementSalesQuery query);

    @Operation(summary = "商品获得明细", description = "商品获得明细")
    @GetMapping("/v3/private/mall/product/statement/item-detail")
    ReturnResult<PageUtil<MallStatementItemResponse>> item(
            @RequestHeader("language") String language,
            @ParameterObject MallStatementItemQuery query);

    @Operation(summary = "商品参与明细", description = "商品参与明细")
    @GetMapping("/v3/private/mall/product/statement/participation-record")
    ReturnResult<PageUtil<ParticipationRecordResponse>> participationRecord(
            @RequestHeader("language") String language,
            @ParameterObject ParticipationRecordQuery query);

    @Operation(summary = "支付记录查询", description = "支付记录查询")
    @GetMapping("/v3/private/mall/product/statement/payment-record")
    ReturnResult<PageUtil<PaymentRecordResponse>> paymentRecord(
            @RequestHeader("language") String language,
            @ParameterObject PaymentRecordQuery query);
}
